package com.benjaminwan.read.free.base.watcher

import android.widget.CompoundButton

class SimpleCheckWatcher(val onCheckChangedEvent: (compoundButton: CompoundButton, isChecked: Boolean) -> Unit) :
    CompoundButton.OnCheckedChangeListener {
    override fun onCheckedChanged(compoundButton: CompoundButton?, isChecked: Boolean) {
        compoundButton ?: return
        onCheckChangedEvent(compoundButton, isChecked)
    }
}